<div id="search">
	<?php echo $this->Html->link(__('New Group', true), array('action' => 'add'),array('class'=>'button','type'=>'button','style'=>'margin-left:151px')); ?>
	
</div>
<div class="list_header">
		<?php
			echo $this->Paginator->counter(array(
			'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
			));
		?>
		<div class="pages">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>|
		<?php echo $this->Paginator->numbers();?>|
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?></div>
	</div>

<div id="container2" class="clearfix">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr class="title">
					
					<td>Hidden</td>
					<td>Group</td>
					<td>SubGroup</td>
					<td colspan="2"><span><?php __('Actions');?></span></td>
				</tr>
				<?php foreach ($groups as $group):?>
				<tr>	
					<td><?php if ($group['Group']['isPrivate'])
						echo $html->tag('input',null,array('type'=>'checkbox','checked'=>'checked'));
						else echo $html->tag('input',null,array('type'=>'checkbox')) ;?>
						&nbsp;</td>
					<td><?php echo $group['Group']['groupName']; ?>&nbsp;</td>
					<td>&nbsp;</td>
					<td class="actions">
						<?php echo $this->Html->link(__('View Subscriber', true), array( 'controller'=>'groups','action' => 'indexSubsciberByGroup',$group['Group']['id']));?>
						<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $group['Group']['id'])); ?>
						<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $group['Group']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $group['Group']['id'])); ?>
					</td>
				</tr>
				<?php foreach ($group['ChildGroup'] as $childGroup):	?>
				<tr>
					<td><?php if ($group['Group']['isPrivate'])
						echo $html->tag('input',null,array('type'=>'checkbox','checked'=>'checked'));
						else echo $html->tag('input',null,array('type'=>'checkbox')) ;?>
						&nbsp;</td>
					<td><?php echo $group['Group']['groupName']; ?>&nbsp;</td>
					<td><?php echo $childGroup['groupName']; ?>&nbsp;</td>
					<td class="actions">
						<?php echo $this->Html->link(__('View Subscriber', true), array( 'controller'=>'groups','action' => 'indexSubsciberByGroup',$group['Group']['id']));?>
						<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $group['Group']['id'])); ?>
						<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $group['Group']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $group['Group']['id'])); ?>
					</td>
				</tr>
				<?php endforeach; endforeach; ?>
			</table>
		</div>